    etInput = (EditText) view.findViewById(R.id.goal_set_checking_in_req_edittext);

    if( goalType == GoalType.DISTANCE ) {
      etInput.setInputType(InputType.TYPE_NUMBER_FLAG_DECIMAL);

    }else{
      etInput.setInputType(InputType.TYPE_CLASS_NUMBER);

    }

    etInput.setText("0");

    etInput.addTextChangedListener(new TextWatcher() {
      @Override
      public void beforeTextChanged(CharSequence s, int start, int count, int after) {
        lastInput = s.toString();
      }

      @Override
      public void onTextChanged(CharSequence s, int start, int before, int count) {
        if (s.toString().trim().substring(0).equals(".")) {
          s = "0" + s;
          etInput.setText(s);
          etInput.setSelection(2);
        }

        int cntDot = 0;

        if( s.toString().trim().contains(".") ){

          for(int i=0; i<s.length(); i++){
            if(s.charAt(i) == '.'){
              cntDot++;
            }
          }

          if( cntDot > 1) {
            etInput.setText(lastInput);
          }

        }

      }
      @Override
      public void afterTextChanged(Editable s) {

      }

    });


// use the result

                  etValue = etInput.getText().toString();

                  if( ! etValue.equals("") && etValue != null ) {


                    if (etValue.toString().endsWith(".")) {
                      etValue = etValue + "0";
                    }

                    if (goalType == GoalType.DISTANCE) {
                      float fTemp = Float.parseFloat(etValue);
                      float checkinRequirementDistanceMax = (float) goalType.getGoalTypeMaxRequirementValue();

                      if (fTemp > checkinRequirementDistanceMax) {
                        etValue = "" + (checkinRequirementDistanceMax - 0.1);
                        etInput.setText(etValue);

                      }
                    }else{
                      int temp = Integer.parseInt(etValue);

                      int checkinRequirementMax = goalType.getGoalTypeMaxRequirementValue();

                      if (temp > checkinRequirementMax) {
                        etValue = "" + (checkinRequirementMax - 1);
                        etInput.setText(etValue);
                      }
                    }
                  }else{
                    etValue = "0";
                  }

                  mListener.onGoalInputCheckinReqValue(etValue,valueUnit);



